home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / source / ncsat.cpt / Telnet2.5 final / vs / vskeys.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-03  |  3.7 KB  |  112 lines

  1. /*
  2.  *        %W%    (NCSA)    %G%
  3.  *
  4.  *      Virtual Screen Kernel Keys and Attribute Definitions
  5.  *  
  6.  *    National Center for Supercomputing Applications
  7.  *      by Gaige B. Paulsen
  8.  *
  9.  *      This file contains equates used by the program for specification of
  10.  *  special Keyboard characters and definition of the Attribute byte.
  11.  *
  12.  *      Version Date    Notes
  13.  *      ------- ------  ---------------------------------------------------
  14.  *      0.01    861102  Initial coding -GBP
  15.  *        2.1        871130    NCSA Telnet 2.1 -GBP
  16.  *        2.2     880715    NCSA Telnet 2.2 -GBP
  17.  *
  18.  */
  19.  
  20. /* internal codes for identifying special keys */
  21.  
  22. #define VSF10     96        /* Function key 10 */        /* BYU 2.4.12 */
  23. #define VSF11     97        /* Function key 11 */        /* BYU 2.4.12 */
  24. #define VSF12     98        /* Function key 12 */        /* BYU 2.4.12 */
  25. #define VSF8     99        /* Function key  8 */        /* BYU 2.4.12 */
  26. #define VSF13    100        /* Function key 13 */        /* BYU 2.4.12 */
  27. #define VSF14    101        /* Function key 14 */        /* BYU 2.4.12 */
  28. #define VSF16    103        /* Function key 16 */        /* BYU 2.4.12 */
  29. #define VSF18    105        /* Function key 18 */        /* BYU 2.4.12 */
  30. #define VSF19    107        /* Function key 19 */        /* BYU 2.4.12 */
  31. #define VSF15    109        /* Function key 15 */        /* BYU 2.4.12 */
  32. #define VSF17    111        /* Function key 17 */        /* BYU 2.4.12 */
  33. #define VSF20    113        /* Function key 20 */        /* BYU 2.4.12 */
  34. #define VSHELP    114        /* Help */                    /* BYU 2.4.12 */
  35. #define VSHOME    115        /* Home */                    /* BYU 2.4.12 */
  36. #define VSPGUP    116        /* Page up */                /* BYU 2.4.12 */
  37. #define VSDEL    117        /* Del */                    /* BYU 2.4.12 */
  38. #define VSF9    118        /* Function key  9 */        /* BYU 2.4.12 */
  39. #define VSEND    119        /* End */                    /* BYU 2.4.12 */
  40. #define VSF7    120        /* Function key  7 */        /* BYU 2.4.12 */
  41. #define VSPGDN    121        /* Page down */                /* BYU 2.4.12 */
  42. #define VSF6    122        /* Function key  6 */        /* BYU 2.4.12 */
  43.  
  44. #define VSUP    129     /* Up Arrow */
  45. #define VSDN    130     /* Down Arrow */
  46. #define VSRT    131     /* Right Arrow */
  47. #define VSLT    132     /* Left Arrow */
  48.  
  49. #define VSK0    133     /* Keypad 0 */
  50. #define VSK1    134     /* Keypad 1 */
  51. #define VSK2    135     /* Keypad 2 */
  52. #define VSK3    136     /* Keypad 3 */
  53. #define VSK4    137     /* Keypad 4 */
  54. #define VSK5    138     /* Keypad 5 */
  55. #define VSK6    139     /* Keypad 6 */
  56. #define VSK7    140     /* Keypad 7 */
  57. #define VSK8    141     /* Keypad 8 */
  58. #define VSK9    142     /* Keypad 9 */
  59.  
  60. #define VSKC    143     /* Keypad , */
  61. #define VSKM    144     /* Keypad - */
  62. #define VSKP    145     /* Keypad . */
  63. #define VSKE    146     /* Keypad Enter */
  64.  
  65. #define VSF1    147     /* Function 1 */
  66. #define VSF2    148     /* Function 2 */
  67. #define VSF3    149     /* Function 3 */
  68. #define VSF4    150     /* Function 4 */
  69.  
  70.  
  71.  
  72.  
  73. #ifdef VSMASTER
  74. char VSIkpxlate[2][23] =
  75.     {    "ABCD0123456789,-.\15PQRS",
  76.         "ABCDpqrstuvwxylmnMPQRS"
  77.     };
  78. char VSIkpxlate2[] = "222122?2?3?3?2?3?3123425161";        /* BYU 2.4.12 */
  79. char VSIkpxlate3[] = "134956?9?2?3?8?1?4~~~~0~8~7";        /* BYU 2.4.12 */
  80. unsigned char VSIkplen[] =                                 /* BYU 2.4.12 */
  81.     { 5,5,5,5,5,5,5,5,5,5,                                /* BYU 2.4.12 */
  82.       5,5,5,5,5,5,5,5,4,4,                                /* BYU 2.4.12 */
  83.       4,4,5,4,5,4,5 };                                    /* BYU 2.4.12 */
  84. #else
  85. extern char *VSIkpxlate,*VSIkpxlate2,*VSIkpxlate2;        /* BYU 2.4.12 */
  86. extern unsigned char *VSIkplen;                            /* BYU 2.4.12 */
  87. #endif
  88.  
  89. /*
  90.  *          Definition of attribute bits in the Virtual Screen
  91.  *
  92.  *          0   -   Bold
  93.  *          1   -   
  94.  *          2   -
  95.  *          3   -   Underline
  96.  *          4   -   Blink
  97.  *          5   -
  98.  *          6   -   Reverse
  99.  *          7   -   Graphics character set
  100.  *
  101.  */
  102.  
  103. #define VSisbold(x) (x & 0x01)
  104. #define VSisundl(x) (x & 0x08)
  105. #define VSisblnk(x) (x & 0x10)
  106. #define VSisrev(x)  (x & 0x40)
  107. #define VSisgrph(x) (x & 0x80)
  108. #define VSinattr(x) (x & 0xd9)
  109.  
  110. #define VSgraph(x)  (x | 0x80)
  111. #define VSnotgraph(x) (x & 0x7F)
  112.